<%--
  Created by IntelliJ IDEA.
  User: vergil
  Date: 11/12/17
  Time: 21:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form method="post" action="/login">
    <input type="text" name="name"/>
    <input type="text" name="pwd"/>
    <input type="submit" name="login">
</form>
<script type="text/javascript">
    var url = 'ws://localhost:8080/socket';
    var sock = new WebSocket(url);
    sock.onopen = function () {
        console.log("socket start...");
    }
    sock.onmessage = function (msg) {
        console.log(msg.data);
    }
    sock.onclose = function () {
        console.log("socket close...");
    }

</script>

</body>
</html>
